home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connectio…eloper Series 2005 March / Dev.CD Mar 05.iso / What's New / Technical Notes and Q&As / ADC Reference Library / qa / qa2001 / downloads / qa1027.hqx / DrawUnicodeString / ReadMe < prev   
Encoding:
Text File  |  2001-04-16  |  1.2 KB  |  32 lines

  1. DrawUnicodeString
  2.  
  3. Overview: 
  4.  
  5. DrawUnicodeString.[hc] provides unicode text drawing routines layered on top of the ATSUI text routines that can be used for drawing Unicode strings.
  6.  
  7. Advantages of using these libraries:
  8.  
  9.   unicode text drawing
  10.  
  11.   drawing text using postscript fonts.
  12.  
  13. Performance Tips:
  14.  
  15. (A)    Creating ATSUI style records takes time.
  16.  
  17. If at all possible, do not call the routine MakeThemeATSUIStyle or the routine MakeSimpleATSUIStyle more than once to create the styles your application requires.  cache the style records created among your application's globals and use them whenever you need to draw text.
  18.  
  19. (B)    Calculating wordbreaks and wrapping text takes time.
  20.  
  21. The routines RenderUnicodeString, MeasureUnicodeString, RenderCFString,  and MeasureCFString include a maxwidth parameter.  Set maxwidth to zero if you know all your text should reside on one    line.  If you look at the source you will notice that when this parameter is non-zero, a separate code path is used that attempts to calculate line breaks at the indicated width.  This takes extra time to do.  If you know there are no line breaks, don't ask for them to be calculated.
  22.  
  23. File Manifest:
  24.  
  25. DrawUnicodeString.h - c header file
  26.  
  27. DrawUnicodeString.c - c implementation file.
  28.  
  29.  
  30.  
  31.  
  32.